From f0d337a0ca6f9e2ed2bf4cae95199082214f24f8 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 27 Sep 2010 17:33:39 +0200 Subject: [PATCH] x11: Fix debug code With recent changes, nobody compiled with debug enabled. Fix that. --- gdk/x11/gdkvisual-x11.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c index a4d639d03a..b3fef17731 100644 --- a/gdk/x11/gdkvisual-x11.c +++ b/gdk/x11/gdkvisual-x11.c @@ -279,10 +279,22 @@ _gdk_visual_init (GdkScreen *screen) #ifdef G_ENABLE_DEBUG if (_gdk_debug_flags & GDK_DEBUG_MISC) - for (i = 0; i < nvisuals; i++) - g_message ("visual: %s: %d", - visual_names[visuals[i]->visual.type], - visuals[i]->visual.depth); + { + static const gchar *const visual_names[] = + { + "static gray", + "grayscale", + "static color", + "pseudo color", + "true color", + "direct color", + }; + + for (i = 0; i < nvisuals; i++) + g_message ("visual: %s: %d", + visual_names[visuals[i]->type], + visuals[i]->depth); + } #endif /* G_ENABLE_DEBUG */ screen_x11->navailable_depths = 0; -- 2.30.2